package com.mo.core.beetl;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.beetl.core.GroupTemplate;
import org.beetl.core.Template;
import org.beetl.ext.web.WebRenderExt;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class GlobalExt implements WebRenderExt{
	@Value("${nginx.hostUrl}")
    private String  hostUrl;
	@Override
	public void modify(Template paramTemplate,
			GroupTemplate paramGroupTemplate,
			HttpServletRequest paramHttpServletRequest,
			HttpServletResponse paramHttpServletResponse) {
		paramTemplate.binding("nginxHostUrl",hostUrl);
		
	}

}
